Pensieve header: Analysis of k=2 invariants in QU: Aiming to find the relationship with OP2.

SetDirectory["C:\\drorbn\\AcademicPensieve\\Projects\\SL2Portfolio"];
<< KnotTheory`
<< "SL2PortfolioProgram.m"

OverbayP2Data=Get["C:\\drorbn\\AcademicPensieve\\People\\Overbay\\OverbayP2Data.m"];
OP2[K_Knot]:=K/.OverbayP2Data/.T->(T^(1/2));

{Length[OverbayP2Data],Last[OverbayP2Data]}

$p=5; $k=2; $U=QU;

SCθ[p_]:=Collect[ Cθ@(Subscript[𝕆, CU])[{y,a,x} ,p]/. {CU->Times, γ|ℏ->1}, ϵ, Simplify];
SQθ[p_]:=Collect[ Qθ@(Subscript[𝕆, QU])[{y,a,x} ,p]/. {QU->Times, γ|ℏ->1}, ϵ, Simplify];

(Subscript[𝔼[L_,Q_,P_], $k_]):=𝔼[L,Q,Series[Normal@P,{ϵ,0,$k}]];
(Subscript[(Subscript[𝔼, d_->r_])[L_,Q_,P_], $k_]):=(Subscript[𝔼, d->r])@@(Subscript[𝔼[L,Q,P], $k]);
𝔼3@𝔼[ω_,L_,Q_,Ps_]:=CF/@(Subscript[𝔼[L,(ω^(-1)) Q,(ω^(-1))((((ω^(-4))ϵ))^(-1+Range@Length@Ps)).Ps], $k]);
𝔼4@𝔼[L_,Q_,P_]:=Module[
{ω=((Normal[P])^(-1))/.ϵ->0,Ps=CoefficientList[P,ϵ]},
CF/@𝔼[ω,L,ω Q,(ω^(-3+4Range@Length@Ps))Ps]];
𝔼3@(Subscript[𝔼, sp___])[as___]:=𝔼3@𝔼[as]/.𝔼->(Subscript[𝔼, sp]);
𝔼4@(Subscript[𝔼, sp___])[as___]:=𝔼4@𝔼[as]/.𝔼->(Subscript[𝔼, sp]);

Clear[QP,ω];
QP[Knot[n_,k_]] := QP[Knot[n,k]]=Collect[Module[{fname},
fname="../SL2Invariant/k=2/Data/"<>ToString[n]<>"_"<>ToString[k]<>".m";
Collect[𝔼3[Get[fname][[2,2]]][[3]] // Normal, ϵ, Simplify]
], ϵ, CF];
ω[K_Knot]:=ω[K]=Factor[(((QP@K/.ϵ->0))^(-1))];
(Subscript[c, k_,d_])[K_Knot]:=Factor[SeriesCoefficient[QP[K],{y,0,0}, {ϵ,0,k},{a,0,d}]((ω[K])^(1+2k-d))]

H[p_]:=If[TrueQ@Simplify[p==(p/.T->1/T)],σ@@CoefficientList[Expand@Together[p]/.(T^(n_))/;n<0:>0,T], p];
H[p_]:=If[TrueQ@Simplify[p==(p/.T->1/T)],Style[Expand@Together[p]/.(T^(n_))/;n<0:>0, Background -> Yellow], p];
H[p_]:=If[TrueQ@Simplify[p==(p/.T->1/T)],Style[p, Background -> Yellow], p];
H[l_List]:=H/@l;

MatrixForm[Table[
H/@Factor/@{ω[K],(Subscript[c, 0,0])[K],(Subscript[c, 1,0])[K],(Subscript[c, 1,1])[K],(Subscript[c, 2,0])[K],(Subscript[c, 2,1])[K],(Subscript[c, 2,2])[K]OP2[K]},
{K,AllKnots[{3,7}]}
]]

p1[K_Knot]:=p1[K]=Factor[((T(-(Subscript[c, 1,0])[K]+ω[K]T(∂_T)ω[K]))/(((T-1))^2))];
ρ1[K_Knot]:=ρ1[K]=Factor[((((T-1))^2)/T)p1[K]];

p2[K_Knot]:=p2[K]=CF[-2(Subscript[c, 2,0])[K]+ω[K](Subscript[c, 2,1])[K]];

p2[Knot[8,21]]

MyCollect[ℰ_,vs_List]:=MyCollect[ℰ,vs,Identity];
MyCollect[ℰ_,vs_List,simp_]:=Total[CoefficientRules[ℰ,vs]/.((ps_->c_):>simp[c]Times@@((vs^ps)))];
MyCollect[ℰs_List,vs_List] := MyCollect[#,vs]&/@ℰs;
MyCollect[ℰs_List,vs_List,simp_] := MyCollect[#,vs,simp]&/@ℰs;
MyCollect[sd_SeriesData,vs_List] := MapAt[MyCollect[#,vs]&, sd, 3];
MyCollect[sd_SeriesData,vs_List,simp_] := MapAt[MyCollect[#,vs,simp]&, sd, 3];

Monitor[Total[Table[
Simplify[((Subscript[c, 0,0])[K]==1)∧(2T(∂_T)ω[K]== (Subscript[c, 1,1])[K])∧((Subscript[c, 2,1])[K]==((2 (-1+T) p1[K] ((1+T) ω[K]-3 (-1+T) T(∂_T)ω[K]))/T)+2 ω[K] ((((-1+T))^2) (∂_T)p1[K]+2 (T^2) ((((∂_T)ω[K]))^2)-T ω[K] ((∂_T)ω[K]+T(∂_(T,T))ω[K])))∧((Subscript[c, 2,2])[K]==-2 T (-2 T ((((∂_T)ω[K]))^2)+ω[K] ((∂_T)ω[K]+T (∂_(T,T))ω[K])))],
{K,AllKnots[{3,10}]}]],
K]

RecoveryFormula=(ω^(-1))+(((-2T ω dω)/((T-1)))x y+2T ω dω a +(ω T dω-((((T-1))^2)/T)p1))(ϵ/(ω^3))+(2 T (ω^2)(2 ((dω)^2) T-dω ω-ddω T ω)(a^2)+(((2 (-1+T) p1 ((1+T) ω-3 (-1+T) T dω))/T)+2 ω ((((-1+T))^2)dp1+2 (T^2) (((dω))^2)-T ω(dω+T ddω)))ω a+((T (ω^2)(4 ((dω)^2) (-1+T) T-dω (-3+T) ω-2 ddω (-1+T) T ω))/((((-1+T))^3) ))(x^2)(y^2)-((2 ω(-3 dω p1 (-1+T) T+dp1 (-1+T) T ω+p1 (1+T) ω))/(T ))x y+((4 T (ω^2)(2 ((dω)^2) (1-T) T-dω ω-ddω (1-T) T ω))/((((-1+T))^2) ))a x y-((p2/2)+ω (3 dω p1 (((-1+T))^2)-(((p1 (-1+(T^2))+T (dp1 (((-1+T))^2)+2 ((dω)^2) (T^2))) ω)/T)+T (dω+ddω T) (ω^2))))((ϵ^2)/(ω^5));

Monitor[MatrixForm@Table[
H@Simplify[{ω,p1,p2,(((T^2)ω dω)/(1-(T^2))),((-p1 (((-1+T))^2)+dω (T^2) ω)/T),
r=-QP[K]+RecoveryFormula}
/. {ω->ω[K],dω->(∂_T)ω[K],ddω->(∂_(T,T))ω[K],p1->p1[K],dp1->(∂_T)p1[K],p2->p2[K]}],
{K,AllKnots[{3,6}]}],
K]

Monitor[Union@Table[
Simplify[r=-QP[K]+RecoveryFormula/. {ω->ω[K],dω->(∂_T)ω[K],ddω->(∂_(T,T))ω[K],p1->p1[K],dp1->(∂_T)p1[K],p2->p2[K]}],
{K,AllKnots[{3,10}]}],K]

MyCollect[Log[(ω RecoveryFormula/.ϵ->(ω^2)ϵ)+((O[ϵ])^3)], {a,x,y},FullSimplify]

(Subscript[C, kij]) is the coefficient of (ϵ^k)(((a^i)(xy))^j) in Log[(ω RecoveryFormula/.ϵ->(ω^2)ϵ)+((O[ϵ])^3)]; (Subscript[T, kij]) is its TeXForm:

(Subscript[T, 100])=ToString@TeXForm[((Subscript[C, 100])=HoldForm[T ω dω -((p1 (((T-1))^2))/T)])/. {dω->ω',p1->(Subscript[p, 1])}];
(Subscript[T, 110])=ToString@TeXForm[((Subscript[C, 110])=HoldForm[2T ω dω])/. {dω->ω',p1->(Subscript[p, 1])}];
(Subscript[T, 101])=ToString@TeXForm[((Subscript[C, 101])=HoldForm[((2T ω dω )/(1-T))])/. {dω->ω',p1->(Subscript[p, 1])}];
If[
Simplify[SeriesCoefficient[Log[(ω RecoveryFormula/.ϵ->(ω^2)ϵ)+((O[ϵ])^3)],1]==ReleaseHold[(Subscript[C, 100])]+ReleaseHold[(Subscript[C, 110])]a+ReleaseHold[(Subscript[C, 101])]x y],
ToString@StringReplace["\\[
  P^{(1)} =
    \\left(T100 \\right)
    + T110 a
    + T101 xy,
\\]",
{"T100"->(Subscript[T, 100]), "T110"->(Subscript[T, 110]),"T101"->(Subscript[T, 101])}]]

(Subscript[T, 200])=ToString@TeXForm[((Subscript[C, 200])=HoldForm[(((T^2) ((ω^2) (2 dp1 (((T-1))^2)+T (3 ((dω)^2) T-2 (dω+ddω T) ω))-p2)-(p1^2) (((T-1))^4)-2 p1 (T-1) T ω (2 dω (T-1) T-(1+T) ω))/(2(T^2)))])/. {dω->ω',ddω->ω'',p1->(Subscript[p, 1]),dp1->(Subscript[p, 1])', p2->(Subscript[p, 2])}];
(Subscript[T, 210])=ToString@TeXForm[((Subscript[C, 210])=HoldForm[((2 ω (p1 ((T^2)-1) ω-2 dω p1 (((T-1))^2) T+T (dp1 (((T-1))^2)+((dω)^2) (T^2)) ω-(T^2) (dω+ddω T) (ω^2)))/T)])/. {dω->ω',ddω->ω'',p1->(Subscript[p, 1]),dp1->(Subscript[p, 1])', p2->(Subscript[p, 2])}];
(Subscript[T, 220])=ToString@TeXForm[((Subscript[C, 220])=HoldForm[2 T (ω^2) (((dω)^2) T-dω ω-ddω T ω)])/. {dω->ω',ddω->ω'',p1->(Subscript[p, 1]),dp1->(Subscript[p, 1])', p2->(Subscript[p, 2])}];
(Subscript[T, 201])=ToString@TeXForm[((Subscript[C, 201])=HoldForm[2 ω (2 dω p1 (T-1)+((((dω)^2) (T^2) ω)/(T-1))-(((dp1 (T-1) T+p1 (1+T)) ω)/T))])/. {dω->ω',ddω->ω'',p1->(Subscript[p, 1]),dp1->(Subscript[p, 1])', p2->(Subscript[p, 2])}];
(Subscript[T, 211])=ToString@TeXForm[((Subscript[C, 211])=HoldForm[((4 T  (ω^2) (ddω (T-1) T ω-((dω)^2) (T-1) T-dω ω))/(((T-1))^2))])/. {dω->ω',ddω->ω'',p1->(Subscript[p, 1]),dp1->(Subscript[p, 1])', p2->(Subscript[p, 2])}];
(Subscript[T, 202])=ToString@TeXForm[((Subscript[C, 202])=HoldForm[((T (ω^2) (2 ((dω)^2) (T-1) T-dω (T-3) ω-2 ddω (T-1) T ω))/(((T-1))^3))])/. {dω->ω',ddω->ω'',p1->(Subscript[p, 1]),dp1->(Subscript[p, 1])', p2->(Subscript[p, 2])}];
If[
Simplify[SeriesCoefficient[Log[(ω RecoveryFormula/.ϵ->(ω^2)ϵ)+((O[ϵ])^3)],2]==ReleaseHold[(Subscript[C, 200])]+ReleaseHold[(Subscript[C, 210])]a+ReleaseHold[(Subscript[C, 220])](a^2)+ReleaseHold[(Subscript[C, 201])]x y+ReleaseHold[(Subscript[C, 211])]a x y+ReleaseHold[(Subscript[C, 202])](x^2)(y^2)],
ToString@StringReplace["\\begin{multline*}
  P^{(2)} =
    T200 \\\\
    + T210 a \\\\
    + T220 a^2
    + T201 x y \\\\
    + T211 a x y
    + T202 x^2y^2.
\\end{multline*}",
{"T200"->(Subscript[T, 200]), "T210"->(Subscript[T, 210]),"T220"->(Subscript[T, 220]),"T201"->(Subscript[T, 201]),"T211"->(Subscript[T, 211]),"T202"->(Subscript[T, 202])}]]

MatrixForm[mat=Table[Module[{r,ω=ω[K],dω=(∂_T)ω[K],ddω=(∂_(T,T))ω[K],dddω=(∂_(T,T,T))ω[K],p1=p1[K],dp1=(∂_T)p1[K],ddp1=(∂_(T,T))p1[K],p2=p2[K]},
Factor@{
r=-QP[K]+(ω^(-1))+(((-2T dω)/((T-1)(ω^2)))x y+((2T dω a)/(ω^2)) +(((ω T dω-((((T-1))^2)/T)p1))/(ω^3)))ϵ+(((-2 T (-2 T  ((dω)^2)+ω (dω+T ddω))(a^2))/(ω^3))+(((((2 (-1+T) p1 ((1+T) ω-3 (-1+T) T dω))/T)+2 ω ((((-1+T))^2)dp1+2 (T^2) (((dω))^2)-T ω(dω+T ddω)))/(ω^4)))a-2(((-2 ((dω)^2) (T^2)+(((T-3) dω T ω)/(2T-2))+ddω (T^2) ω)/((((T-1))^2)(ω^3))))(x^2)(y^2)-((((T^2)-1))/((T+1)T/2 (ω^4)))(-3 dω p1 T+(((T+1) p1 ω)/(T-1))+dp1 T ω)x y+(4/((T-1)(ω^3)))(-2 ((dω)^2) (T^2)-((dω T ω)/((T-1)))+ddω (T^2) ω)a x y)(ϵ^2);Coefficient[(ω^5)r, (ϵ^2)],
p2,
(ω^2)p1 ,ω p1 ,p1 ,ω p1 T dω ,p1 T dω ,T dp1 ,ω T dp1 ,((ω )^2)T dp1 ,(T^2)(∂_(T,T))ρ1 ,ω (T^2)ddp1 ,(T^2)dω dp1,
(p1^2),p1 T dp1 ,
(ω^4),(ω^3),(ω^2),ω,
((ω )^3)T dω ,((ω )^2)T dω ,ω T dω , T dω ,
(ω^2)(((T dω ))^2),ω (((T dω ))^2),(((T dω))^2),
((ω )^3) (T^2)ddω ,((ω )^2) (T^2)ddω ,ω (T^2)ddω ,(T^2)ddω ,
ω (T^3)dddω ,(T^3)dddω 
}],
{K,AllKnots[{3,8}]}
]];
Dimensions[mat]
MatrixRank[mat/.T->(10^6)]
NullSpace[mat/.T->(10^3)]

{-1,(1/2),-(999999/1000),0,0,(2994003/1000),0,0,0,-(998001/1000),0,0,0,0,0,0,0,0,0,1,0,0,0,-2,0,0,1,0,0,0,0,0}.{
r,p2,
(ω^2)p1 ,ω p1 ,p1 ,ω p1 T dω ,p1 T dω ,T dp1 ,ω T dp1 ,((ω )^2)T dp1 ,(T^2)(∂_(T,T))ρ1 ,ω (T^2)ddp1 ,(T^2)dω dp1,
(p1^2),p1 T dp1 ,
(ω^4),(ω^3),(ω^2),ω,
((ω )^3)T dω ,((ω )^2)T dω ,ω T dω , T dω ,
(ω^2)(((T dω ))^2),ω (((T dω ))^2),(((T dω))^2),
((ω )^3) (T^2)ddω ,((ω )^2) (T^2)ddω ,ω (T^2)ddω ,(T^2)ddω ,
ω (T^3)dddω ,(T^3)dddω 
}

MatrixForm[Table[
H/@Together/@Expand /@ {ω[K],p1[K],ρ1[K],-2(Subscript[c, 2,0])[K]+ω[K](Subscript[c, 2,1])[K],OP2[K], OP2[K]/ω[K]},
{K,AllKnots[{3,8}]}
]]

MatrixForm[Table[
Together/@Expand /@ {ω[K],(∂_T)ω[K],p1[K],ρ1[K],-2(Subscript[c, 2,0])[K]+ω[K](Subscript[c, 2,1])[K],OP2[K], OP2[K]/ω[K]},
{K,AllKnots[{3,8}]}
]/.T->1]

MatrixForm[mat=Table[
Factor@{
OP2[K],OP2[K]/.T->-T,(Subscript[c, 2,1])[K],(Subscript[c, 2,2])[K],-2(Subscript[c, 2,0])[K]+ω[K](Subscript[c, 2,1])[K],
((ω[K])^2)ρ1[K],ω[K]ρ1[K],ρ1[K],ω[K]ρ1[K]T(∂_T)ω[K],ρ1[K]T(∂_T)ω[K],T(∂_T)ρ1[K],ω[K]T(∂_T)ρ1[K],((ω[K])^2)T(∂_T)ρ1[K],(T^2)(∂_(T,T))ρ1[K],ω[K](T^2)(∂_(T,T))ρ1[K],(T^2)(∂_(T,T))(ω[K]ρ1[K]),
((ρ1[K])^2),ρ1[K]T(∂_T)ρ1[K],
((ω[K])^4),((ω[K])^3),((ω[K])^2),ω[K],
((ω[K])^3)T(∂_T)ω[K],((ω[K])^2)T(∂_T)ω[K],ω[K] T(∂_T)ω[K], T(∂_T)ω[K],
((ω[K])^2)(((T(∂_T)ω[K]))^2),ω[K](((T(∂_T)ω[K]))^2),(((T(∂_T)ω[K]))^2),
((ω[K])^3) (T^2)(∂_(T,T))ω[K],((ω[K])^2) (T^2)(∂_(T,T))ω[K],ω[K] (T^2)(∂_(T,T))ω[K],(T^2)(∂_(T,T))ω[K],
ω[K](T^3)(∂_(T,T,T))ω[K],(T^3)(∂_(T,T,T))ω[K]
},
{K,AllKnots[{3,8}]}
]];
Dimensions[mat]
MatrixRank[mat/.T->(10^6)]
NullSpace[mat/.T->(10^12)]

MatrixForm[mat=Table[
Factor@{
OP2[K],(Subscript[c, 2,1])[K],(Subscript[c, 2,2])[K],-2(Subscript[c, 2,0])[K]+ω[K](Subscript[c, 2,1])[K],
ω[K]ρ1[K],ρ1[K],ρ1[K]T(∂_T)ω[K],ω[K]T(∂_T)ρ1[K],
((ω[K])^2)T(∂_T)ω[K],ω[K] T(∂_T)ω[K], T(∂_T)ω[K],
ω[K](((T(∂_T)ω[K]))^2),(((T(∂_T)ω[K]))^2),
((ω[K])^2) (T^2)(∂_(T,T))ω[K],ω[K] (T^2)(∂_(T,T))ω[K],
1
},
{K,AllKnots[{8,8}]}
]];
Dimensions[mat]
MatrixRank[mat/.T->(10^4)]
NullSpace[mat/.T->(10^4)]//MatrixForm

Length[AllKnots[{8,8}]]

MatrixForm[mat=Table[
Factor@{
OP2[K],(Subscript[c, 2,1])[K],(Subscript[c, 2,2])[K],-2(Subscript[c, 2,0])[K]+ω[K](Subscript[c, 2,1])[K],
((ω[K])^2)ρ1[K],ω[K]ρ1[K],ρ1[K],ω[K]ρ1[K]T(∂_T)ω[K],ρ1[K]T(∂_T)ω[K],T(∂_T)ρ1[K],ω[K]T(∂_T)ρ1[K],((ω[K])^2)T(∂_T)ρ1[K],(T^2)(∂_(T,T))ρ1[K],ω[K](T^2)(∂_(T,T))ρ1[K],(T^2)(∂_(T,T))(ω[K]ρ1[K]),
((ρ1[K])^2),ρ1[K]T(∂_T)ρ1[K],
((ω[K])^4),((ω[K])^3),((ω[K])^2),ω[K],1,
((ω[K])^3)T(∂_T)ω[K],((ω[K])^2)T(∂_T)ω[K],ω[K] T(∂_T)ω[K], T(∂_T)ω[K],
((ω[K])^2)(((T(∂_T)ω[K]))^2),ω[K](((T(∂_T)ω[K]))^2),(((T(∂_T)ω[K]))^2),
((ω[K])^3) (T^2)(∂_(T,T))ω[K],((ω[K])^2) (T^2)(∂_(T,T))ω[K],ω[K] (T^2)(∂_(T,T))ω[K],(T^2)(∂_(T,T))ω[K]
},
{K,AllKnots[{3,8}]}
]];
Dimensions[mat]
MatrixRank[mat/.T->(10^4)]
NullSpace[mat/.T->(10^4)]//MatrixForm

MatrixForm@H[mat=Table[
Factor@{
-2(Subscript[c, 2,0])[K]+ω[K](Subscript[c, 2,1])[K],
((ω[K])^2)ρ1[K],ω[K]ρ1[K],ρ1[K],(T-(T^(-1)))ω[K]ρ1[K]T(∂_T)ω[K],(T-(T^(-1)))ρ1[K]T(∂_T)ω[K],(T-(T^(-1)))T(∂_T)ρ1[K],(T-(T^(-1)))ω[K]T(∂_T)ρ1[K],(T-(T^(-1)))((ω[K])^2)T(∂_T)ρ1[K],T(∂_T)(T(∂_T)ρ1[K]),ω[K]T(∂_T)(T(∂_T)ρ1[K]),T(∂_T)(T(∂_T)(ω[K]ρ1[K])),
((ρ1[K])^2),ρ1[K](T-(T^(-1)))T(∂_T)ρ1[K],
((ω[K])^4),((ω[K])^3),((ω[K])^2),ω[K],
(T-(T^(-1)))((ω[K])^3)T(∂_T)ω[K],(T-(T^(-1)))((ω[K])^2)T(∂_T)ω[K],(T-(T^(-1)))ω[K] T(∂_T)ω[K], (T-(T^(-1)))T(∂_T)ω[K],
((ω[K])^2)(((T(∂_T)ω[K]))^2),ω[K](((T(∂_T)ω[K]))^2),(((T(∂_T)ω[K]))^2),
((ω[K])^3) T(∂_T)(T(∂_T)ω[K]),((ω[K])^2)T(∂_T)(T(∂_T)ω[K]),ω[K] T(∂_T)(T(∂_T)ω[K]),T(∂_T)(T(∂_T)ω[K]),
(T-(T^(-1)))ω[K]T(∂_T)(T(∂_T)(T(∂_T)ω[K])),(T-(T^(-1)))T(∂_T)(T(∂_T)(T(∂_T)ω[K]))
},
{K,AllKnots[{3,9}]}
]];
Dimensions[mat]
MatrixRank[mat/.T->(10^4)]
NullSpace[mat/.T->(10^4)]//MatrixForm

(mat0=Map[Coefficient[#,T,0]& ,mat, {2}])//MatrixForm

s=(10^5);
(red=LatticeReduce[Prepend[mat0,s IdentityMatrix[Dimensions[mat0][[2]]][[1]]]\[Transpose]]\[Transpose]);
rel=LinearSolve[mat0,Rest[red][[All,Position[red[[1]],s][[1,1]]]]]
Factor@Expand[mat.rel] // Column